package com.matt.repository;

import com.matt.domain.ChildrenContractInfoRecord;
import com.matt.domain.ChildrenExtendInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import java.util.Date;
import java.util.List;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2017/8/31
 * *******************************
 */
public interface ChildrenContractInfoRecordRepository extends JpaRepository<ChildrenContractInfoRecord, String> {

    @Query(value = "SELECT  IFNULL(MAX(surplusOriginalLeaveDay),0)  FROM children_contract_info_record where contractId = ?1", nativeQuery = true)
    Integer getMaxSurplusOriginalLeaveDay(String contractId);
}
